6320b4d1daf82a545ab36dd88ae824ef20ebf07c,cloudant-client/src/test/java/com/cloudant/tests/HttpTest.java,HttpTest,test429BackoffMaxMoreThanRetriesAllowed,#,694

Before Change


            CloudantClient c = CloudantClientHelper.newMockWebServerClientBuilder(mockWebServer)
                    .interceptors(new Replay429Interceptor(10, 1, true))
                    .build();
            c.executeRequest(Http.GET(c.getBaseUri()).setNumberOfRetries(3));
            fail("There should be a TooManyRequestsException");
        } catch (TooManyRequestsException e) {
            assertEquals("There should be 3 request attempts", 3, mockWebServer
                    .getRequestCount());

After Change


            CloudantClient c = CloudantClientHelper.newMockWebServerClientBuilder(mockWebServer)
                    .interceptors(new Replay429Interceptor(10, 1, true))
                    .build();
            String response = c.executeRequest(Http.GET(c.getBaseUri()).setNumberOfRetries(3))
                    .responseAsString();
            fail("There should be a TooManyRequestsException instead had response " + response);
        } catch (TooManyRequestsException e) {
            assertEquals("There should be 3 request attempts", 3, mockWebServer
                    .getRequestCount());